1. Field of the Invention
The present invention relates to a pattern generation scheme of correctly filling the interior of a closed curve defined by an outline with a predetermined pattern, for use in a computer graphics processor or a vector font processor each using bit map display.
2. Description of Related Art
The following method (not prior art) may be possible as a scheme of generating a filling pattern at high speed in accordance with outline information.
Bit map memories having rectangular bit map areas are prepared for two planes A and B. PA1 Outline information of a filling pattern is converted into a raster (converted into a dot pattern) to calculate the differences between bits of an outline (FIG. 2). PA1 On the basis of a series of differences, flags for filling are formed on plane B in accordance with predetermined rules (FIG. 3B). PA1 At the same time, a complete outline is formed on plane A (FIG. 3A). PA1 When formation of the outline is finished, exclusive OR (to be referred to as XOR hereinafter) is sequentially calculated in a scan line direction (FIG. 3C), and a logical operation such as OR with the outline data on plane A is calculated, thereby obtaining a complete filling pattern (FIG. 3D). PA1 An extra filling processing memory is required in addition to a main work area. PA1 Since a pattern must be sequentially formed from the divided left side even when only a portion of an outline is to be filled, a time required to generate a filling pattern is prolonged.
The above method has a problem in that if an outline overflows a work area, especially to the left side in the x direction (i.e., a direction toward a scanning start position in the scan line direction), correct filling cannot be performed. For example, an incomplete filling pattern as shown in FIG. 4B is generated with respect to an outline (OLl) as shown in FIG. 4A.
To solve the above problem, there is one possible method (not prior art) in which if an outline overflows to the left of a work area, this outline is divided into several parts and a filling pattern is formed from an overflowed divided portion on the left side.
In this method, in order to perform filling processing for the right-side portion, XOR scanning results on the left side are held in units of scan lines and used as initial values for XOR scanning on the right side, thereby obtaining a correct filling pattern. However, this method also has the following problems.